/* AdminLayout.module.css */
.adminLayout {
  display: flex;
  height: 100vh;
  background-color: #f5f5f5;
}

.sidebar {
  width: 240px;
  background: #001529;
  color: white;
  display: flex;
  flex-direction: column;
}

.sidebarHeader {
  padding: 20px 16px;
  border-bottom: 1px solid #434343;
}

.sidebarHeader h2 {
  margin: 0;
  font-size: 18px;
  color: white;
}

.sidebarNav {
  flex: 1;
  padding: 16px 0;
}

.menuItem {
  position: relative;
}

.navItem {
  width: 100%;
  padding: 12px 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.navItem:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.navItem.active {
  color: #1890ff;
  background: rgba(24, 144, 255, 0.1);
  border-right: 3px solid #1890ff;
}

.hasChildren {
  composes: navItem;
  justify-content: space-between;
}

.menuIcon {
  font-size: 16px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navItemText {
  flex: 1;
  text-align: left;
}

.navItemArrow {
  font-size: 12px;
  transition: transform 0.3s;
  margin-left: 8px;
}

.navItemArrow.expanded {
  transform: rotate(0deg);
}

.navItemArrow:not(.expanded) {
  transform: rotate(-90deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #000c17;
}

.submenu.expanded {
  max-height: 300px;
}

.submenuItem {
  width: 100%;
  padding: 10px 20px 10px 40px;
  text-align: left;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.submenuIcon {
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.submenuItem:hover {
  color: white;
  background-color: #1890ff;
}

.submenuItem.active {
  color: white;
  background-color: #1890ff;
  border-left: 3px solid #1890ff;
}

.mainContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contentHeader {
  height: 64px;
  background: white;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.headerLeft h1 {
  margin: 0;
  font-size: 20px;
  color: #262626;
}

.userInfo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcomeText {
  color: #666;
}

.username {
  color: #1890ff;
  font-weight: 500;
}

.logoutBtnHeader {
  background: transparent;
  border: 1px solid #d9d9d9;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  transition: all 0.3s;
}

.logoutBtnHeader:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.tabBar {
  background: white;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  min-height: 48px;
}

.tabList {
  display: flex;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  gap: 4px;
}

.tab {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-bottom: none;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  min-width: 120px;
  max-width: 200px;
  transition: all 0.3s;
  position: relative;
}

.tab:hover {
  background: #e6f7ff;
  color: #1890ff;
}

.tab.active {
  background: white;
  border-color: #1890ff;
  color: #1890ff;
  border-bottom: 1px solid white;
  margin-bottom: -1px;
}

.tabTitle {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.tabClose {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 8px;
  border-radius: 2px;
  font-size: 14px;
  color: #999;
  transition: all 0.3s;
}

.tabClose:hover {
  background: #ff4d4f;
  color: white;
}

.tabActions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

.tabActionBtn {
  background: none;
  border: 1px solid #d9d9d9;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  transition: all 0.3s;
}

.tabActionBtn:hover {
  background: #f5f5f5;
  border-color: #1890ff;
  color: #1890ff;
}

.contentBody {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: white;
}

.tabList::-webkit-scrollbar {
  height: 4px;
}

.tabList::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.tabList::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.tabList::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}